package com.aaa.controller;

import com.aaa.entity.Purchase;
import com.aaa.service.PurchaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("purchase")
@Slf4j

public class PurchaseController {
    @Resource
    PurchaseService purchaseService;

    @RequestMapping("select")
    @ResponseBody
    public List<Purchase>select(){
        return purchaseService.select();
    }
}
